const { Controller } = require('egg');

class TopicLessonVideoLogsController extends Controller {
  async report() {
    const { ctx } = this;
    const { videoId, datas } = ctx.request.body;

    if (!videoId) {
      return ctx.helper.error('必填项缺失，请检查videoId');
    }

    const { userId } = await this.service.auth.getCurrentUser();


    const res = await this.service.topicLessonVideoLogs.createOrUpdate({videoId, userId, datas});
    this.ctx.helper.success(res);
  }



}

module.exports = TopicLessonVideoLogsController;